package cn.com.scitc.pano.controller;
import org.springframework.security.core.context.SecurityContextHolder;
import org.
        springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserWorkController {
    public String pathname;

    @RequestMapping("/goods")
    @ResponseBody
    public String userwork(String path) {
        this.pathname = path;
        return "goods";
    }

    @GetMapping("/usergoods")
    public String userwork(Model model){
        System.out.println(pathname);
        model.addAttribute("pathname",pathname + "/tour.xml");
        model.addAttribute("pathnamejs",pathname + "/tour.js");
       return "usergoods";
    }
}
